﻿using System;
using DatabaseStuff;

namespace DatabaseStuff.Basic
{
    /// <summary>
    /// Basic implementation of a database table field
    /// </summary>
    public class Field: IDBField
    {
        private string name;
        private bool isPrimaryKey;
        private DBDataType type;

        internal Field(string _name, bool _isPrimaryKey, DBDataType _type)
        {
            name = _name;
            isPrimaryKey = _isPrimaryKey;
            type = _type;
        }

        public string Name
        {
            get { return name; }
        }

        public bool IsPrimaryKey
        {
            get { return isPrimaryKey; }
        }

        public DBDataType Type
        {
            get { return type; }
        }
    }
}
